<template>
    <div>
        <div class="latest-recommed">周末去哪儿</div>
        <ul>
            <li class="item" v-for="item of week" :key="item.id">
                <img class="item-img" :src="item.urlImg" alt="">
                <div class="item-info">
                    <p class="item-title">{{item.title}}</p>
                    <p class="item-desc">{{item.desc}}</p>
                </div>
            </li>
        </ul>
    </div>
</template>

<script>
export default {
  name: 'HomeWeek',
  props: {
    week: Array
  }
}
</script>

<style scoped>
*{
    padding: 0;
    margin: 0;
}
.latest-recommed{
    font-size: 1rem;
    font-weight: 400;
    background-color: #eee;
    height: 2.4rem;
    text-align: left;
    line-height: 2.4rem;
    text-indent: 1em;
}
ul{
    margin: 0;
    padding: 0;
}
ul li{
    list-style-type: none;
}
.item-img{
    width: 100%;
}
.item-info{
    /* 多出部分用省略号代替 */
    min-width: 0;
    text-align: left;
    text-indent: .4em;
}
.item-title{
    font-size: 1.2em;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.item-desc{
    color: #888;
    margin: 6px 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
</style>
